package com.wandian.utils
{
	import flash.display.Sprite;

	import com.wandian.ui.controls.Button;
	import com.wandian.ui.controls.Label;
	import com.wandian.ui.controls.LabelButton;
	import com.wandian.ui.controls.TextInput;

	public class UIHelper
	{
		public static function createLabel(parent:Sprite, text:String, x:int, y:int):Label
		{
			var label:Label=new Label()
			label.initialize()
			label.text=text;
			label.x=x
			label.y=y
			parent.addChild(label)
			return label;
		}

		public static function createTextInput(parent:Sprite, x:int, y:int):TextInput
		{
			var txt:TextInput=new TextInput()
			txt.initialize()
			txt.x=x
			txt.y=y
			parent.addChild(txt)
			return txt;
		}

		public static function createLabelButton(parent:Sprite, label:String, x:int, y:int):LabelButton
		{
			var btn:LabelButton=new LabelButton()
			btn.initialize()
			btn.label=label;
			btn.x=x
			btn.y=y
			parent.addChild(btn)
			return btn
		}
	}
}
